﻿<Window x:Class="DropBoxLinker.frmNotify" Name="wndMain"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        SizeToContent="WidthAndHeight" Title="DropBox Linker"
        WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True" Topmost="False"
        UseLayoutRounding="True" RenderOptions.BitmapScalingMode="NearestNeighbor"
        ShowInTaskbar="False" Background="Transparent" ShowActivated="False">
    
    <Window.Triggers>
        
        <!-- loaded: start fading -->
        <EventTrigger RoutedEvent="Loaded">
            <BeginStoryboard Name="PopupStoryboard">
                <Storyboard Completed="AnimationComplete">

                    <!-- show -->
                    <DoubleAnimation BeginTime="00:00:00.0" To="1.0" Duration="00:00:00.3" 
                        Storyboard.TargetName="wndMain" Storyboard.TargetProperty="Opacity"
                        Name="PopupShowAnimation" />

                    <!-- hide -->
                    <DoubleAnimation BeginTime="00:00:03.0" To="0.0" Duration="00:00:00.3" 
                        Storyboard.TargetName="wndMain" Storyboard.TargetProperty="Opacity"
                        Name="PopupHideAnimation" />

                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>

        <!-- mouse enter: revert up to show-complete, pause -->
        <EventTrigger RoutedEvent="MouseEnter">
            <SeekStoryboard BeginStoryboardName="PopupStoryboard" Offset="00:00:00.3" />
            <PauseStoryboard BeginStoryboardName="PopupStoryboard" />
        </EventTrigger>
        
        <!-- mouse leave: resume -->
        <EventTrigger RoutedEvent="MouseLeave">
            <ResumeStoryboard BeginStoryboardName="PopupStoryboard" />
        </EventTrigger>
        
    </Window.Triggers>

    <Border Padding="8,2,8,5" BorderThickness="1" BorderBrush="#777777"
            CornerRadius="2" ClipToBounds="True" MouseDown="AnimationComplete">
        
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="#FEFEFE" Offset="0" />
                <GradientStop Color="#E9E9E9" Offset="1" />
            </LinearGradientBrush>
        </Border.Background>
        
        <StackPanel Orientation="Horizontal">

            <Image Source="/DropBoxLinker;component/graphics/icon24.png" Stretch="None"
                    VerticalAlignment="Top" Margin="0,6,0,0" />

            <StackPanel Orientation="Vertical" Margin="8,0,0,0">

                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="txtTitle" Text="sample-title" FontSize="17" Foreground="#222222" />
                    <TextBlock Name="txtExt" Text=".ext" FontSize="14" Foreground="#555555" VerticalAlignment="Bottom" Margin="1,0,0,1" />
                </StackPanel>

                <TextBlock Name="txtState" Text="action description" Foreground="#888888"
                            FontSize="10" Margin="0,-2,0,0" />
                
            </StackPanel>
            
        </StackPanel>
       
    </Border>
    
</Window>
